package com.example.test.启动线程.死锁;

public class A implements Runnable {
    @Override
    public void run() {
       printA();
    }

    public synchronized static void printA(){
        System.out.println("A");
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        B.printB();
    }
}
